# -*- coding: utf-8 -*-
# @Software :   PyCharm
# @File     :   email_send.py
# @Author   :   zhaolie
# @Contact  :   zhaolie1989@gmail.com
# @Time     :   2019/11/17 6:21 下午
# @Desc     :   None      

# here put the import lib
import uuid
import hashlib

from users.models import EmailVerifyRecord


def random_str():
    uuid_val = uuid.uuid4()
    uuid_str = str(uuid_val).encode("utf-8")
    md5 = hashlib.md5()
    md5.update(uuid_str)
    return md5.hexdigest()


def send_register_email(email, type=0):
    email_record = EmailVerifyRecord()
    code = random_str(16)
